<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>按点评类查询</title>
<style type="text/css">
  body{
    width:1280px;
    margin:0 auto;
  }
  table {
  	border-collapse:collapse;
  	width:100%;
  }
  table tr th, table tr td {
    text-align:center;
  }
  .pageList{
    float:right;
    clear:both;
  }
  .pageList_foot{
    clear:both;
    margin-bottom:20px;
    text-align:center;
  }
  .critiqueList{
    float:right;
    clear:both;
    width:100%;
  }
  .firstTR{
  	background-color:#FFD800;
  }
  .splitTR{
  	background-color:#CCCCCC;
  }
  .ab-head {
  }
</style>
<script>
  function pre(){
    var pageNo = parseInt(document.getElementById("pageNo").value);
    if (pageNo > 1) {
      pageNo = pageNo - 1;
    }
    goPage(pageNo);
  }
  function next() {
    var pageNo = parseInt(document.getElementById("pageNo").value);
    var totalPage = parseInt(document.getElementById("totalPage").value);
    if (pageNo < totalPage) {
      pageNo = pageNo + 1;
    }
    goPage(pageNo);
  }
  function last() {
    var totalPage = parseInt(document.getElementById("totalPage").value);
    goPage(totalPage);
  }
  function goPage(pageNo) {
    var currentPage = parseInt(document.getElementById("pageNo").value);
    var totalPage = parseInt(document.getElementById("totalPage").value);
    if (currentPage == 1 && pageNo == 1) {
      alert("已在首页");
      return false;
    }
    if (currentPage == totalPage && pageNo == totalPage) {
      alert("已达最后一页");
      return false;
    }
    location.href="showAutoCritique.action?pageNo="+pageNo;
  }
</script>
</head>
<body>
	<div class="ab-head">
	<s:include value="/WEB-INF/page/car/common/head.jsp"></s:include>
	</div>
	<div class="pageList">
	共${totalRecordCount}条记录,当前是第${currentPage}页，共${totalPage}页
	<a href="javascript:void(0)" onclick="goPage(1)">首页</a>&nbsp;<a href="javascript:void(0)" onclick="pre()">上一页</a>&nbsp;<a href="javascript:void(0)" onclick="next()">下一页</a>&nbsp;<a href="javascript:void(0)" onclick="last()">最后一页</a>&nbsp;
	</div>
	<div class="critiqueList">
		<table border="1" cellpadding="0" cellspacing="0">
			<thead>
				<tr>
					<th colspan="11">按点评类查询</th>
				</tr>
			</thead>
			<tbody>
			<s:iterator value="#request.autoCritiqueList" id="critique" status="st">
				<tr class="firstTR">
					<td>host</td>
					<td colspan="10"><s:property value="host"/></td>
				</tr>
				<tr>
					<td colspan="1"><img src="<s:property value="picture"/>" width="120" height="90"/></td>
					<td colspan="10">
						<div>
							<table border="1" cellpadding="0" cellspacing="0">
								<tr>
									<td width="30%">brand</td>
									<td width="70%"><s:property value="brand"/></td>
								</tr>
								<tr>
									<td>factory</td>
									<td><s:property value="factory"/></td>
								</tr>
								<tr>
									<td>series</td>
									<td><a href="<s:property value="out_link"/>" target="_blank"><s:property value="series"/></a></td>
								</tr>
								<tr>
									<td>series_alias</td>
									<td><s:property value="series_alias"/></td>
								</tr>
								<tr>
									<td>official_price</td>
									<td><s:property value="official_price"/></td>
								</tr>
								<tr>
									<td>oil_consumption</td>
									<td>
										<div>
											<table border="1" cellpadding="0" cellspacing="0">
												<tr>
													<td width="50%">official</td>
													<td width="50%"><s:property value="oil_consumption.official"/></td>
												</tr>
												<tr>
													<td>client</td>
													<td><s:property value="oil_consumption.client"/></td>
												</tr>
											</table>
										</div>
									</td>
								</tr>
								<tr>
									<td>guarantee</td>
									<td><s:property value="guarantee"/></td>
								</tr>
								<tr>
									<td>origin</td>
									<td><s:property value="origin"/></td>
								</tr>
								<tr>
									<td>grade</td>
									<td><s:property value="grade"/></td>
								</tr>
								<tr>
									<td>max_speed</td>
									<td><s:property value="max_speed"/></td>
								</tr>
							</table>
						</div>
					</td>
				</tr>
				<tr>
					<td>emission</td>
					<td colspan="10"><s:property value="emission"/></td>
				</tr>
				<tr>
					<td>gear_box</td>
					<td colspan="10"><s:property value="gear_box"/></td>
				</tr>
				<tr>
					<td>advantage</td>
					<td colspan="10"><a href="<s:property value="advantage_link"/>" target="_blank"><s:property value="advantage"/></a></td>
				</tr>
				<tr>
					<td>disadvantage</td>
					<td colspan="10"><a href="<s:property value="disadvantage_link"/>" target="_blank"><s:property value="disadvantage"/></a></td>
				</tr>
				<tr>
					<td>button_outlink</td>
					<td colspan="2"><a href="<s:property value="button_outlink.config"/>" target="_blank">config(<s:property value="button_outlink.config"/>)</a></td>
					<td colspan="2"><a href="<s:property value="button_outlink.pic"/>" target="_blank">pic(<s:property value="button_outlink.pic"/>)</a></td>
					<td colspan="2"><a href="<s:property value="button_outlink.comment"/>" target="_blank">comment(<s:property value="button_outlink.comment"/>)</a></td>
					<td colspan="3"><a href="<s:property value="button_outlink.dealer"/>" target="_blank">dealer(<s:property value="button_outlink.dealer"/>)</a></td>
				</tr>
				<tr class="splitTR">
					<td colspan="11">&nbsp;</td>
				</tr>
			</s:iterator>
			</tbody>
		</table>
	</div>
	<div class="pageList_foot">
	共${totalRecordCount}条记录,当前是第${currentPage}页，共${totalPage}页
	<a href="javascript:void(0)" onclick="goPage(1)">首页</a>&nbsp;<a href="javascript:void(0)" onclick="pre()">上一页</a>&nbsp;<a href="javascript:void(0)" onclick="next()">下一页</a>&nbsp;<a href="javascript:void(0)" onclick="last()">最后一页</a>&nbsp;
	</div>
	<input type="hidden" name="pageSize" id="pageSize" value="${pagesize}"/>
	<input type="hidden" name="currentPage" id="currentPage" value="${currentPage}"/>
	<input type="hidden" name="pageNo" id="pageNo" value="${pageNo}"/>
	<input type="hidden" name="totalPage" id="totalPage" value="${totalPage}"/>
</body>
</html>